package com.hd.trans.network.apiService;


import android.util.Log;

import com.hd.trans.TranslationInterior;

/**
 * 地址配置
 */
public final class UrlConstant {

    /**
     * API 服务器
     */
    private final static String BASE_URL_TEST = "http://115.159.44.133:8992/"; //测试环境http://iconvert.alitest.yiyongcad.com/
    public final static String BASE_URL_PRODUCTION_MAIN= "https://app.xunjiepdf.com/";//生产环境主域名
    public final static String BASE_URL_PRODUCTION_SPARE = "https://app2.weiduruanjian.com/";//生产环境备用域名
    public static String BASE_URL_PRODUCTION = BASE_URL_PRODUCTION_MAIN; //生产环境
    /**
     * 新翻译API服务器地址
     */
    public static String TRANSLATION_API_URL_DEBUG = "https://xiaomaai.nnxieli.com/";//https://nnapi.nnxieli.com/";//测试环境
    public static String TRANSLATION_API_URL = "https://xiaomaai.nnxieli.com/";
    public static String TRANSLATION_API_URL_SPARE = "https://xiaomaai.weiduruanjian.com/";//备用域名
    public static String BASE_TRANSLATION_API_URL = TRANSLATION_API_URL; //生产环境
    /**
     * V4_API服务器地址：text2Voice,AiChat,wav2Lip
     * 测试环境: http://iconvert.alitest.yiyongcad.com
     * 正式环境: https://iconvert-api.xunjietupian.com
     */
    public static String V4_API_URL_DEBUG = "http://iconvert.alitest.yiyongcad.com/";//测试环境
    public static String V4_API_URL_RELEASE = "https://iconvert-api.xunjietupian.com/";//正式环境
    public static String TTS_URL_DEBUG = "https://nnapi.nnxieli.com";//测试环境https://godel.run
    public static String TTS_URL_RELEASE = "https://nnapi.nnxieli.com";//正式环境
    /**
     * 配置 服务器
     */
    private final static String BASE_CONFIG_URL_TEST = "http://guoqiang.alitest.yiyongcad.com/"; //测试环境
    private final static String BASE_CONFIG_URL_PRODUCTION = "https://h5.daotudashi.com/"; //生产环境

    /**
     * 获取语音识别服务器地址
     */
    private final static String BASE_VOICE_URL_TEST = "http://47.251.25.233:9001/"; //测试环境
    private final static String BASE_VOICE_URL_MAIN = "http://47.251.25.233:9001/"; //生产环境
    private final static String BASE_VOICE_URL_SPARE = "http://47.251.25.233:9001/"; //生产环境备用域名
    public static String BASE_VOICE_URL = BASE_VOICE_URL_MAIN; //生产环境


    public static String getBaseUrl() {
        String baseUrl = TranslationInterior.isDebug() ? BASE_URL_TEST : BASE_URL_PRODUCTION;
            Log.d("TestingServer","getBaseUrl()="+baseUrl);
        return baseUrl;
    }


    public static String getBaseConfigUrl() {
        return TranslationInterior.isDebug() ? BASE_CONFIG_URL_TEST : BASE_CONFIG_URL_PRODUCTION;
    }

    public static String getTranslationApiUrl(){
        return TranslationInterior.isDebug() ? TRANSLATION_API_URL_DEBUG : BASE_TRANSLATION_API_URL;
    }

    public static String getV4ApiUrl(){
        return TranslationInterior.isDebug() ? V4_API_URL_DEBUG : V4_API_URL_RELEASE;
    }

    public static String getTtsUrl(){
        return TranslationInterior.isDebug() ? TTS_URL_DEBUG : TTS_URL_RELEASE;
    }

    public static String getVoiceUrlUrl(){
        return TranslationInterior.isDebug() ? BASE_VOICE_URL_TEST : BASE_VOICE_URL;
    }

    public static String getCloudServiceUrl(){
        return "https://oss-liuchengtu.hudunsoft.com/";
    }

}
